<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>ALNS-framework: ALNS Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ALNS-framework
   &#160;<span id="projectnumber">0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classALNS-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ALNS Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This class contains the <a class="el" href="classALNS.html" title="This class contains the ALNS logic. ">ALNS</a> logic.  
 <a href="classALNS.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="ALNS_8h_source.html">ALNS.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a73b1c0d89a08733cf96b8bd3bd3b1ee0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a73b1c0d89a08733cf96b8bd3bd3b1ee0">ALNS</a> (std::string instanceName, <a class="el" href="classISolution.html">ISolution</a> &amp;initialSolution, <a class="el" href="classIAcceptanceModule.html">IAcceptanceModule</a> &amp;acceptanceCrit, <a class="el" href="classALNS__Parameters.html">ALNS_Parameters</a> &amp;parameters, <a class="el" href="classAOperatorManager.html">AOperatorManager</a> &amp;opMan, <a class="el" href="classIBestSolutionManager.html">IBestSolutionManager</a> &amp;solMan, <a class="el" href="classILocalSearchManager.html">ILocalSearchManager</a> &amp;lsMan)</td></tr>
<tr class="separator:a73b1c0d89a08733cf96b8bd3bd3b1ee0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a981532332c893575df882950ba108420"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a981532332c893575df882950ba108420"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a981532332c893575df882950ba108420">~ALNS</a> ()</td></tr>
<tr class="memdesc:a981532332c893575df882950ba108420"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr class="separator:a981532332c893575df882950ba108420"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02bfc43130ca878023ab85da3990aee8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a02bfc43130ca878023ab85da3990aee8">solve</a> ()</td></tr>
<tr class="separator:a02bfc43130ca878023ab85da3990aee8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a603d6dfef21bcb16cb0d4e0ee70dcad8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a603d6dfef21bcb16cb0d4e0ee70dcad8">checkAgainstKnownSolution</a> (<a class="el" href="classISolution.html">ISolution</a> &amp;sol)</td></tr>
<tr class="separator:a603d6dfef21bcb16cb0d4e0ee70dcad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af86fb8b68cd36fc947c53d53edf37841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#af86fb8b68cd36fc947c53d53edf37841">performOneIteration</a> ()</td></tr>
<tr class="separator:af86fb8b68cd36fc947c53d53edf37841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a914ea0dff7f09b5fd5da9ab8040515a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a914ea0dff7f09b5fd5da9ab8040515a7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a914ea0dff7f09b5fd5da9ab8040515a7">isStoppingCriterionMet</a> ()</td></tr>
<tr class="memdesc:a914ea0dff7f09b5fd5da9ab8040515a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method check whether or not the stopping criteria is met. <br/></td></tr>
<tr class="separator:a914ea0dff7f09b5fd5da9ab8040515a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dec1742b0f3e6bfc03a087ccb1cf5ee"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a3dec1742b0f3e6bfc03a087ccb1cf5ee">isNewBest</a> (<a class="el" href="classISolution.html">ISolution</a> *newSol)</td></tr>
<tr class="separator:a3dec1742b0f3e6bfc03a087ccb1cf5ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24567f634de0dd28dc09c7ccde13f7c2"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a24567f634de0dd28dc09c7ccde13f7c2">getNumberKnownSolutions</a> ()</td></tr>
<tr class="separator:a24567f634de0dd28dc09c7ccde13f7c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c9c4ccbbfac3a70ef92dca8fbff68b4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a6c9c4ccbbfac3a70ef92dca8fbff68b4">transitionCurrentSolution</a> (<a class="el" href="classISolution.html">ISolution</a> *newSol)</td></tr>
<tr class="separator:a6c9c4ccbbfac3a70ef92dca8fbff68b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8070a2581e7cee3cb46452eef5f97aaf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8070a2581e7cee3cb46452eef5f97aaf"></a>
<a class="el" href="classIBestSolutionManager.html">IBestSolutionManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a8070a2581e7cee3cb46452eef5f97aaf">getBestSolutionManager</a> ()</td></tr>
<tr class="memdesc:a8070a2581e7cee3cb46452eef5f97aaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a pointer to the best known solution. <br/></td></tr>
<tr class="separator:a8070a2581e7cee3cb46452eef5f97aaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adde152b15ac1197b1b31232ee205072c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#adde152b15ac1197b1b31232ee205072c">addUpdatable</a> (<a class="el" href="classIUpdatable.html">IUpdatable</a> &amp;up)</td></tr>
<tr class="separator:adde152b15ac1197b1b31232ee205072c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d32f5f1178d89d4f34fc19aff270a5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classALNS.html#a6d32f5f1178d89d4f34fc19aff270a5b">end</a> ()</td></tr>
<tr class="separator:a6d32f5f1178d89d4f34fc19aff270a5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class contains the <a class="el" href="classALNS.html" title="This class contains the ALNS logic. ">ALNS</a> logic. </p>
<p>This class contains the logic of the <a class="el" href="classALNS.html" title="This class contains the ALNS logic. ">ALNS</a> (Adaptive Large Neighborhood Search). The general idea of the <a class="el" href="classALNS.html" title="This class contains the ALNS logic. ">ALNS</a> is to iteratively destroy then repair a solution to improve its quality. Non improving solution may be accepted as the new current solution according to some acceptance criteria. If you are interested about the general functionning of this method please refer to: S. Ropke &amp; D. Pisinger. An Adaptive Large Neighborhood Search Heuristic for Pickup and Delivery Problem with Time Windows. Transportation Science, 40 (2006) 455-472. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a73b1c0d89a08733cf96b8bd3bd3b1ee0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ALNS::ALNS </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>instanceName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classISolution.html">ISolution</a> &amp;&#160;</td>
          <td class="paramname"><em>initialSolution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classIAcceptanceModule.html">IAcceptanceModule</a> &amp;&#160;</td>
          <td class="paramname"><em>acceptanceCrit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classALNS__Parameters.html">ALNS_Parameters</a> &amp;&#160;</td>
          <td class="paramname"><em>parameters</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classAOperatorManager.html">AOperatorManager</a> &amp;&#160;</td>
          <td class="paramname"><em>opMan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classIBestSolutionManager.html">IBestSolutionManager</a> &amp;&#160;</td>
          <td class="paramname"><em>solMan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classILocalSearchManager.html">ILocalSearchManager</a> &amp;&#160;</td>
          <td class="paramname"><em>lsMan</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>the name of the instance. </td></tr>
    <tr><td class="paramname">initialSolution</td><td>the starting solution that is going to be optimized. </td></tr>
    <tr><td class="paramname">acceptanceCrit</td><td>the module that determine whether or not a new solution is accepted as the current solution. </td></tr>
    <tr><td class="paramname">parameters</td><td>the set of parameters to be use by the <a class="el" href="classALNS.html" title="This class contains the ALNS logic. ">ALNS</a>. </td></tr>
    <tr><td class="paramname">opMan</td><td>an operator manager. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="adde152b15ac1197b1b31232ee205072c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ALNS::addUpdatable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classIUpdatable.html">IUpdatable</a> &amp;&#160;</td>
          <td class="paramname"><em>up</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Add an object to the list of object to be updated at the end of each iteration of the <a class="el" href="classALNS.html" title="This class contains the ALNS logic. ">ALNS</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">up</td><td>the updatable object to be added. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a603d6dfef21bcb16cb0d4e0ee70dcad8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ALNS::checkAgainstKnownSolution </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classISolution.html">ISolution</a> &amp;&#160;</td>
          <td class="paramname"><em>sol</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This method seeks if a solution is already known, if not it is added to the set of known solutions. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sol</td><td>the solution to be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the solution was unknown, false otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a6d32f5f1178d89d4f34fc19aff270a5b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ALNS::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy the manager that have been provided at the construction of the instance. </p>

</div>
</div>
<a class="anchor" id="a24567f634de0dd28dc09c7ccde13f7c2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t ALNS::getNumberKnownSolutions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the number of known solutions. </dd></dl>

</div>
</div>
<a class="anchor" id="a3dec1742b0f3e6bfc03a087ccb1cf5ee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ALNS::isNewBest </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classISolution.html">ISolution</a> *&#160;</td>
          <td class="paramname"><em>newSol</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Determine whether or not the new solution is better than the best known solution. </p>

</div>
</div>
<a class="anchor" id="af86fb8b68cd36fc947c53d53edf37841"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ALNS::performOneIteration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This method perform one iteration of the <a class="el" href="classALNS.html" title="This class contains the ALNS logic. ">ALNS</a> solving process. </p>

</div>
</div>
<a class="anchor" id="a02bfc43130ca878023ab85da3990aee8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ALNS::solve </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This method launch the solving process. </p>
<dl class="section return"><dt>Returns</dt><dd>true if a feasible solution is found, false otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a6c9c4ccbbfac3a70ef92dca8fbff68b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ALNS::transitionCurrentSolution </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classISolution.html">ISolution</a> *&#160;</td>
          <td class="paramname"><em>newSol</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Determine whether or not the new solution should be accepted as the current solution. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/alns/<a class="el" href="ALNS_8h_source.html">ALNS.h</a></li>
<li>src/alns/ALNS.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Nov 10 2014 18:34:28 for ALNS-framework by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
